Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround old version of /bin/date in msysgit #7781

Merged
merged 1 commit into from
Jul 30, 2014

Conversation

tkelman
Copy link
Contributor

@tkelman tkelman commented Jul 29, 2014

I don't expect many people other than me to be trying to use msysgit as a build environment, but I found the version of /bin/date is pretty ancient there and running version_git.sh gives an error invalid date @1406586781'`.

Can someone test this on Mac, make sure using a switch case instead of an if statement doesn't break anything? Works okay on RHEL5, Ubuntu 14.04, Cygwin, MSYS2, and msysgit (wow I'm accumulating a crapton of different build environments).

I don't know the oldest version of git for which --pretty=format:%ci works, but that's pretty close to what we want here, so this could be cleaned up and unified across platforms instead of adding a special case for MSYS. TODO later?

fails with "invalid date `@1406586781'"
@ivarne
Copy link
Member

ivarne commented Jul 29, 2014

LGTM

# This file was autogenerated in base/version_git.sh
immutable GitVersionInfo
    commit::String
    commit_short::String
    branch::String
    build_number::Int
    date_string::String
    tagged_commit::Bool
    fork_master_distance::Int
    fork_master_timestamp::Float64
end

const GIT_VERSION_INFO = GitVersionInfo(
    "01fb9841abc91c3a31814a7f8871df6ad1468c20",
    "01fb984*",
    "tkelman/date-format",
    259,
    "2014-07-29 16:35 UTC",
    false,
    0,
    1406651706.
)

@ivarne
Copy link
Member

ivarne commented Jul 29, 2014

--pretty=format:%ct is already in use for fork_master_timestamp. I did not use it last time to avoid breaking more than needed, but it seems like it can be done backwards compatible.

const GIT_VERSION_INFO = GitVersionInfo(
   #snip
    strftime("format_str", 1406651706),
   #snip
)

Maybe that should wait for the Dates module, so we can change the type as well.

@vtjnash vtjnash added this to the 0.3 milestone Jul 29, 2014
@tkelman
Copy link
Contributor Author

tkelman commented Jul 29, 2014

@vtjnash no hurry here, I think you owe everyone dinner #7774 (comment)

@vtjnash
Copy link
Member

vtjnash commented Jul 29, 2014

Haha, build fixes aren't new features

@tkelman
Copy link
Contributor Author

tkelman commented Jul 29, 2014

Well, this is a build fix that affects me and so far only me, unless anybody else has given my MSVC PR a try.

@Keno
Copy link
Member

Keno commented Jul 30, 2014

LGTM. Works on Mac. Merging for now.

Keno added a commit that referenced this pull request Jul 30, 2014
workaround old version of /bin/date in msysgit
@Keno Keno merged commit ff8fe5d into JuliaLang:master Jul 30, 2014
@tkelman tkelman deleted the date-format branch July 31, 2014 04:54
@tkelman
Copy link
Contributor Author

tkelman commented Jul 31, 2014

Don't shoot me if it causes trouble on a BSD or something, but I don't think it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants